#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#  Copyright (c) Huoty - All rights reserved
# 
#      Author: Huoty <sudohuoty@gmail.com>
#  CreateTime: 2016-10-03 18:13:12
# *************************************************************

import requests
from pyquery import PyQuery

req = requests.get("https://www.so.com/s?ie=utf-8&shb=1&src=360sou_newhome&q=D2001")
body = req.content.decode('utf-8')
doc = PyQuery(body)
table = doc("#mohe-train_number table")
print table
for td in table("tr").items():
    print td.text().split()

# Script starts from here


